function show_date_time(){
window.setTimeout("show_date_time()", 1000);
BirthDay=new Date("01/01/2018 00:00:00");//获取当前时间到2018/1/1的时间秒数差,可以拓展day,h,m,s的格式
today=new Date();
timeold=(today.getTime()-BirthDay.getTime());
sectimeold=timeold/1000
secondsold=Math.floor(sectimeold);
document.getElementById('days').innerHTML="陪你度过"+secondsold+"秒";//id选择器来控制getElementById('gram String @')
}
function setzero(i){
if (i<10)
{i="0" + i};
return i;
}
show_date_time();